package com.example.partner.service;

import com.example.partner.common.BaseResponse;
import com.example.partner.model.domain.Team;
import com.example.partner.model.dto.TeamQuery;
import com.example.partner.model.request.DeleteRequest;
import com.example.partner.model.request.TeamJoinRequest;
import com.example.partner.model.request.TeamQuitRequest;
import com.example.partner.model.request.TeamUpdateRequest;
import com.example.partner.model.request.UserLoginRequest;
import com.example.partner.model.request.TeamAddRequest;
import com.example.partner.model.request.UserRegisterRequest;
import com.example.partner.model.vo.TeamUserVo;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface TeamService {
    @GET("api/team/list/my/create")
    Call<BaseResponse<List<TeamUserVo>>> listMyCreateTeams(@Query("userId") Long userId );
    @GET("api/team/list/my/join")
    Call<BaseResponse<List<TeamUserVo>>> listMyJoinTeams(@Query("userId") Long userId);
    @GET("api/team/list/my/join/count")
    Call<BaseResponse<Integer>> countMyJoinTeams(@Query("userId") Long userId);
    @GET("api/team/list/searchName")
    Call<BaseResponse<List<TeamUserVo>>> listTeamsBySearchName(@Query("teamname") String teamname);
    @GET("api/team/list/searchStatus")
    Call<BaseResponse<List<TeamUserVo>>> listTeamsBySearchStatus(@Query("status") Integer status);
    @GET("api/team/isJoin")
    Call<BaseResponse<Boolean>> isJoin(@Query("userId") Long userId,@Query("teamId") Long teamId);
    @GET("api/team/get")
    Call<BaseResponse<TeamUserVo>> getTeamById(@Query("id") long id);
    @POST("api/team/add")
    Call<BaseResponse<Long>> addTeam(@Body TeamAddRequest request);
    @POST("api/team/update")
    Call<BaseResponse<Boolean>> updateTeam(@Body TeamUpdateRequest teamUpdateRequest);
    @POST("api/team/delete")
    Call<BaseResponse<Boolean>> deleteTeam(@Body DeleteRequest deleteRequest);
    @POST("api/team/join")
    Call<BaseResponse<Boolean>> joinTeam(@Body Map<String, Object> teamjoin);
    @POST("api/team/quit")
    Call<BaseResponse<Boolean>> quitTeam(@Body TeamQuitRequest teamQuitRequest);

}
